import {Component, OnInit, ViewEncapsulation, ChangeDetectionStrategy, Input} from '@angular/core';

import {Router} from '@angular/router';
import {SocialCircle} from "@interface/index";


@Component({
  selector: 'circle-nav',
  templateUrl: './circle-nav.component.html',
  styleUrls: ['./circle-nav.component.scss'],
  encapsulation: ViewEncapsulation.None
})
export class CircleNavComponent implements OnInit {
  @Input() navList;

  constructor(private router: Router) {
  }

  /**
   * @description 前往目标页面
   * @author ouyqx-691
   * @date 2017/12/12
   * @param navItem 单个 nav 对象
   */
  goToCircleDetail(nav: SocialCircle) {
    this.router.navigate([`/community/circle`, nav.circleId]);
  }

  ngOnInit() {

  }

}
